home *** CD-ROM | disk | FTP | other *** search
-
- > The sound as I understand this must be the ingame-sound-fx. And yes, that I
- > could code. I have thougth about it today (While working hard!!!) and come
- > up with this solution:
-
- This all makes sense, but you might want to think about priority decay, so
- that samples which have previously been started reduce in priority as time
- advances - ensuring that all or most samples are triggered, even if they
- are never completed. Very important for spot effects which have a decaying
- envelope.
-
- > Maximum of 4 or 8 mixed sounds. (Selecteble while playingprefably) Each of
-
- Great - just like Doom.
-
- > And now to the actual replay:
-
- Again, no problem with 12.25khz - but remember that we need adjustable
- frequency playback so we can 'turbulate' monster noises. This way we can
- avoid deja-vu with repeated grunts & gunfire at the same pitch.
-
- Doom gets round this horrible effect by playing each sample at a random
- frequency based around a fixed pitch of (around) 9khz.
-
- We could go further by having a slightly random 'shift' in pitch over time -
- just enough to remove the repetitive quality. This should require no additional
- CPU overheads beyond standard variable pitch.
-
- I realise we will have to suffer lower quality audio (6 or 12k) to achieve this
- and still retain plenty of CPU time, but the game will sound terrible without this
- random pitch turbulation when there are more than 2 monsters nearby.
-
- > The second time loss/winning is having inerleaved replayed... Lets show
- > what I mean. A comma separates the sample bytes (stereo not shown).
- > A+B,C+D,A+B,C+D,A+... (Interleaved)
- > A+B+C+D,A+B+C+D,A+... (Non interleaved)
- > I do not know if interleaved will sound terible for 12.kHz or not... But if
- > not then the time winning would be good.
-
- You could try it and see - and even keep it as an option for slow machines if
- it turns out a bit rough, but I think we will still need a fully mixed version
- of the driver - especially considering how many accelerators are kicking around
- now.
-
- > The replay code will land on nearly 200k of RAM, if I can cood it as I want
- > to... This includes some tables for 3D sound and such, but I think I could
- > get it very fast with some effort put into it. And that I will do!
-
- 200k of code - are you considering code generation? Remember this will not
- cache on the 68030 and 68040 - and tables can suffer in a similar fashion due
- to heavy thrashing (random access).
-
- I would prefer to avoid heavy generated code unless it really does offer
- fantastic benefits over cached loops. If the 200k is for volume tables and
- other conversion data then I can't really see the problem anyway.
-
- > Before I begin, I want to know how you want the interface for adding new
- > sounds to be played, and inprovements, tips, and most important if someone
- > already have started on theese routines...
-
- Nobody I am aware of has looked very far into the audio side. As for an interface,
- something like this:
-
- * sample index (1-100 etc.)
- * envelope index (table modifies local volume over time in 50hz slices)
- * base volume (0-255 etc.)
- * base pitch
- * turbulence factor (converted to random pitch offset & perhaps a gradient)
- * base priority (0-3 - 0=ambient_fx 1=normal_spot_fx 2=override_all)
- * x,y map coordinates
-
- Or something like that. These are the ones that spring to mind anyway...
-
- Doug.
-
-